home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / pc_board / gift40b7.zip / PRO-T.BAT < prev    next >
DOS Batch File  |  1991-12-07  |  767b  |  43 lines

  1. @echo off
  2. echo off
  3. rem -- pro-t.bat - process "test" archive request - for ProDOOR 3.4
  4. rem -- %1-resultfile, %2 sourcefile
  5.  
  6. testfile %2 zip lzh gif
  7. if errorlevel == 98 goto cant_handle
  8. if errorlevel == 3 goto gif
  9. if errorlevel == 2 goto lzh
  10. if errorlevel == 1 goto zip
  11. goto end
  12.  
  13. :gif
  14. giftest %2 >>%1
  15. goto end
  16.  
  17. :zip
  18. pkunzip -t >>%1 %2
  19. if errorlevel 1 goto error
  20. goto end
  21.  
  22. :lzh
  23. rem lha 2.11 or later required for test function to work
  24. lha t /v >>%1 %2
  25. if errorlevel 1 goto error
  26. goto end
  27.  
  28. :pack_error
  29. echo Y|del $$$$ >nul
  30. rmdir $$$$
  31. goto error
  32.  
  33. :error
  34. echo. >>%1
  35. echo %2 has errors! >>%1
  36. echo %0: Error were detected while processing %2 ! >>%1
  37. goto end
  38.  
  39. :cant_handle
  40. echo Sorry, %0 does not know how to process %2 ! >>%1
  41.  
  42. :end
  43.